package com.work.captcha.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:DELL
 * Date:2025-05-21
 * Time:21:23
 */
@RequestMapping("/logger")
@RestController
public class LoggerController {
    private static Logger logger= LoggerFactory.getLogger("LoggerController");
    @RequestMapping("/print")
    public String Logger(){
        logger.info("使用认知对象打印日志");
        System.out.println("使用sout打印日志");
        return "success";
    }
    @RequestMapping("/level")
    public String levelPrint(){
        logger.trace("====trace级别====");
        logger.debug("====debug级别====");
        logger.info("====info级别====");
        logger.warn("====warn级别====");
        logger.error("====error级别====");
        return "success";
    }
}
